package com.hospital.diagnosis.module.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import lombok.Data;

import java.time.LocalDateTime;

@Data
public class ChatSessionDTO
{
    /**
    * 主键id
    */
    private Long id;

    /**
    * 会话id
    */
    private String sessionId;

    /**
    * 医生id
    */
    private Long doctorId;

    /**
    * 患者id
    */
    private Long patientId;

    /**
    * 聊天质量评估id
    */
    private Long chatEvaluationId;

    /**
    * 会话状态(0进行中,1已结束)
    */
    private Integer sessionStatus;

    /**
    * 聊天会话创建时间
    */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    private LocalDateTime createTime;

    /**
    * 患者未读消息数
    */
    private Integer patientUnreadCount;

    /**
    * 医生未读消息数
    */
    private Integer doctorUnreadCount;
}